<template>
	<view class="container"><web-view :webview-styles="webviewStyles" :src="webViewSrc"></web-view></view>
</template>

<script>
export default {
	data() {
		return {
			webviewStyles: {
				progress: {
					color: '#F44336'
				}
			},
			webViewSrc: ''
		};
	},
	onLoad(e) {
		if(!e.target){
			uni.switchTab({
				url: '../index/index'
			});
			return;
		}
		e.target = decodeURIComponent(e.target);
		// #ifndef H5
		this.webViewSrc = e.target || '';
		// #endif
		
	}
};
</script>

<style lang="scss" scoped></style>
